<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <h1>这里是H1标题</h1>
        <h2>这里是H2标题</h2>
        <h3></h3>
        <p>这里是p标签</p>
    </body>
</html>
<script>
    const regx = /<(h[1-6])>[\s\S]*<\/\1>/gi;
    document.body.innerHTML = document.body.innerHTML.replace(regx, "");
</script>
